package org.jeecg.modules.scm.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.scm.query.FaceAuthQuery;
import org.jeecg.modules.scm.service.WxFaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/wx-face")
@Api(tags = "微信人脸核身")
public class WxFaceController {

    @Autowired
    private WxFaceService wxFaceService;

    // 腾讯微信h5 人脸核身
    @RequestMapping(value = "detectAuth", method = RequestMethod.POST)
    @ApiOperation("人脸核身")
    public Result<String> detectAuth(@RequestBody FaceAuthQuery query) throws Exception {
        String url = wxFaceService.detectAuth(query);
        return Result.OK(url);
    }

}
